using System;
using Holoville.HOTween;
using UnityEngine;

public static class CommonAnimation
{
	public static void StartFadeInOutAnimation(tk2dSprite obj, float gapTime = 1f)
	{
		obj.color = new Color(1f, 1f, 1f, 1f);
		Sequence sequence = new Sequence(new SequenceParms().Loops(-1).Id(obj.GetInstanceID().ToString()));
		sequence.Insert(0f, HOTween.To(obj, gapTime, "color", new Color(1f, 1f, 1f, 0.3f)));
		sequence.Insert(gapTime, HOTween.To(obj, gapTime, "color", new Color(1f, 1f, 1f, 1f)));
		sequence.Play();
	}

	public static void StopFadeInOutAnimation(tk2dSprite obj)
	{
		HOTween.Kill(obj.GetInstanceID().ToString());
	}
}
